<template>
    <ContentBase>
        <ul class="nav nav-tabs" style="margin-bottom: 20px;" v-if="$store.state.user.identity == 'teacher'">
            <li class="nav-item">
                <router-link :class="route_name == 'TeacherInvoice' ? 'nav-link active' : 'nav-link'" :to="{name: 'TeacherInvoice'}">我的</router-link>
            </li>
            <li class="nav-item">
                <router-link :class="route_name == 'StudentInvoice' ? 'nav-link active' : 'nav-link'" :to="{name: 'StudentInvoice'}">学生</router-link>
            </li>
        </ul>
        <router-view v-if="$store.state.user.identity == 'teacher'" />
        <OwnInvoice v-if="$store.state.user.identity == 'student'" />
    </ContentBase>
</template>

<script setup>
import ContentBase from '../components/ContentBase';
import OwnInvoice from '@/components/OwnInvoice.vue';
import { useRoute } from 'vue-router';
import { computed } from 'vue';

const route = useRoute();
let route_name = computed(() => route.name);

</script>

<style scoped>

</style>